<?php
$dep_id=$data[dep_id];
$doc_id= $data[doc_id];
$doc_name= $data[doc_name];
require_once './connect.php';
//处理数据
/*$sql = "SELECT dep_id FROM _department where dep_name='$_dep'";
$result = $conn->query($sql);
if($result->num_rows)
{
    $row=$result->fetch_assoc();
    $_dep=$row['dep_id'];
}*/
//添加语句
$sql = "INSERT INTO _doctor(dep_id,doc_id,doc_name)VALUES ('$dep_id','$doc_id','$doc_name')";
if ($conn->query($sql) === TRUE) {
    $response = '成功';
} else {
    $response = '失败';
}

echo 'test'.$response;
$conn->close();
?>